
//默认提交
function msg_form(){		

	var flag = true;
	//地区
	if(!check('address')){	
		$("#address").focus();
		flag = false;
		//return false;
	}

	return flag;	
}

//onFocus(获取鼠标焦点时)
function pro(id){
	var obj = $("#"+id);
	var obj_bk = $("#"+id+"_bk");
	switch (id){
	//地区	
	case "address": 
		//obj_bk.attr("class","focus");
		//obj_bk.html('手机号码格式不正确');	
		return false;
	break;


						
	}	
}


//onFocus(获取鼠标焦点时)
var phone="";//保存当前可以注册的用户名
var captcha="";//保存当前可以注册的邮箱


//onBlur(释放鼠标焦点时)
function check(id){
	var flag = false;
	var vals = $("#"+id).val();
	var obj = $("#"+id);
	var obj_bk = $("#"+id+"_bk");
	
	switch (id){
	//地区
	case "address":
		if (vals==""){
			obj_bk.attr("class","focus");
			obj_bk.html('请选择地区');
			return false;
		}else{
			obj_bk.attr("class","check");
			obj_bk.html('地区已选择。');
			return true;
		}
	break;	
					
	}	
}

